import ajax from '@/utils/request.js'

export function getPhoneCode(data) {
	return ajax({
		url: '/mobile/sendCode',
		method: 'GET',
		data
	})
}

export function register(data) {
	return ajax({
		url: '/mobile/register',
		data
	})
}

export function loginFun(data) {
	return ajax({
		url: '/mobile/login',
		data
	})
}

export function wxLoginFun(data) {
	return ajax({
		url: '/mobile/wxLogin',
		method: 'GET',
		data
	})
}

export function appleLogin(data) {
	return ajax({
		url: '/mobile/appleLogin',
		method: 'POST',
		data,
		debug: true
	})
}

export function bindPhone(data, Authorization) {
	return ajax({
		url: '/mobile/bindPhone',
		method: 'POST',
		data,
		header: { Authorization }
	})
}